-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add known-bug
tests for 11 unsound issues
#110480
Add known-bug
tests for 11 unsound issues
#110480
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jackh726 (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just a comment on the header comments.
For other issues, feel free to add them here, or you can open separate PRs.
// submitted by @aturon: The combination of variance and implied bounds for | ||
// nested references opens a hole in the current type system | ||
// known-bug: #25860 | ||
// check-pass | ||
// unsoundness issue: should-fail | ||
|
||
// mcve from @pnkfelix | ||
// https://github.com/rust-lang/rust/issues/25860#issue-82044592 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably too much here. Here's what I would write:
// check-pass
// known-bug #23860
// Should fail. The combination of variance and implied bounds for
// nested references allows us to infer a longer lifetime than we can prove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, thanks! Updated.
66b3ae7
to
a535aa8
Compare
Hmm, I'm thinking I should open a new pull request, since it looks like issue # in commit msg is spamming the issues? |
This comment has been minimized.
This comment has been minimized.
You can squash your commits and edit the message on the way |
Yeah, are you able to squash the commits into just one? And then you can edit the message to not tag the issue (just make the commit message like "add known-bug test for issue 25860). Then, we can tag the issue in the PR description. Then, if you want to add more tests, basically repeat, with one test per commit? (But I'm happy to merge with one test and followup later with others if you're interested) |
Yes! This is great, thanks.
Sounds good, will do.
Ah, so I should edit the top comment after all the tests are in? I appreciate the help. Let me know if there's anything else. |
d8c832f
to
7f7f00c
Compare
7f7f00c
to
7cd2696
Compare
Of course! Thanks for the contribution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some nits on one test then LGTM.
@@ -0,0 +1,28 @@ | |||
// check-pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test isn't in the right place (impl-trait
tests are for impl Trait
syntax).
Maybe just under tests/ui/coherence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, moved to tests/ui/coherence
as suggested.
// Coherence = given a trait and some set of types for its type parameters, | ||
// there should be *exactly one* impl that applies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment isn't needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, removed.
9b33d6b
to
af3a6be
Compare
Alright! Hopefully good to go.
|
@@ -0,0 +1,68 @@ | |||
// check-pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agh just saw that this test is not in the right place. Let's just put it under tests/ui/typeck
or tests/ui/issues
. (tests/ui/deref
would be nicer, but not worth creating a whole directory for only one test)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, moved to tests/ui/typeck
.
@@ -0,0 +1,15 @@ | |||
// check-pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also move this to tests/ui/closures
, static
is for static
items, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, moved to tests/ui/closures
.
af3a6be
to
5674295
Compare
5674295
to
3c5de9a
Compare
Added 4 new tests and updated PR description. That's all the tests for this PR. Happy to make changes, move things around, etc. |
known-bug
tests for 11 unsound issues
Thanks! This is great. @bors r+ rollup |
…unsound-issues, r=jackh726 Add `known-bug` tests for 11 unsound issues r? `@jackh726` Should tests for other issues be in separate PRs? Thanks. Edit: Partially addresses rust-lang#105107. This PR adds `known-bug` tests for 11 unsound issues: - rust-lang#25860 - rust-lang#49206 - rust-lang#57893 - rust-lang#84366 - rust-lang#84533 - rust-lang#84591 - rust-lang#85099 - rust-lang#98117 - rust-lang#100041 - rust-lang#100051 - rust-lang#104005
…unsound-issues, r=jackh726 Add `known-bug` tests for 11 unsound issues r? ``@jackh726`` Should tests for other issues be in separate PRs? Thanks. Edit: Partially addresses rust-lang#105107. This PR adds `known-bug` tests for 11 unsound issues: - rust-lang#25860 - rust-lang#49206 - rust-lang#57893 - rust-lang#84366 - rust-lang#84533 - rust-lang#84591 - rust-lang#85099 - rust-lang#98117 - rust-lang#100041 - rust-lang#100051 - rust-lang#104005
note to self: need to add |
…unsound-issues, r=jackh726 Add `known-bug` tests for 11 unsound issues r? `@jackh726` Should tests for other issues be in separate PRs? Thanks. Edit: Partially addresses rust-lang#105107. This PR adds `known-bug` tests for 11 unsound issues: - rust-lang#25860 - rust-lang#49206 - rust-lang#57893 - rust-lang#84366 - rust-lang#84533 - rust-lang#84591 - rust-lang#85099 - rust-lang#98117 - rust-lang#100041 - rust-lang#100051 - rust-lang#104005
…unsound-issues, r=jackh726 Add `known-bug` tests for 11 unsound issues r? ``@jackh726`` Should tests for other issues be in separate PRs? Thanks. Edit: Partially addresses rust-lang#105107. This PR adds `known-bug` tests for 11 unsound issues: - rust-lang#25860 - rust-lang#49206 - rust-lang#57893 - rust-lang#84366 - rust-lang#84533 - rust-lang#84591 - rust-lang#85099 - rust-lang#98117 - rust-lang#100041 - rust-lang#100051 - rust-lang#104005
…unsound-issues, r=jackh726 Add `known-bug` tests for 11 unsound issues r? `@jackh726` Should tests for other issues be in separate PRs? Thanks. Edit: Partially addresses rust-lang#105107. This PR adds `known-bug` tests for 11 unsound issues: - rust-lang#25860 - rust-lang#49206 - rust-lang#57893 - rust-lang#84366 - rust-lang#84533 - rust-lang#84591 - rust-lang#85099 - rust-lang#98117 - rust-lang#100041 - rust-lang#100051 - rust-lang#104005
Rollup of 10 pull requests Successful merges: - rust-lang#110480 (Add `known-bug` tests for 11 unsound issues) - rust-lang#110539 (Move around `{Idx, IndexVec, IndexSlice}` adjacent code) - rust-lang#110590 (Add some tests around (lack of) object safety of associated types and consts) - rust-lang#110602 (Ignore src/bootstrap formatting commit in .git-blame-ignore-revs) - rust-lang#110667 (pointer-auth-link-with-c: Fix cross compilation.) - rust-lang#110681 (drop few unused crates, gate libc under unix for rustc_codegen_ssa) - rust-lang#110685 (Some cleanups to DataflowConstProp) - rust-lang#110744 (bootstrap: update paths cargo-credential crate) - rust-lang#110750 (Add size asserts for MIR `SourceScopeData` & `VarDebugInfo`) - rust-lang#110760 (rustdoc: Add regression test for rust-lang#60522) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
r? @jackh726
Should tests for other issues be in separate PRs? Thanks.
Edit: Partially addresses #105107. This PR adds
known-bug
tests for 11 unsound issues:Pin
unsoundness involving animpl DerefMut for Pin<&dyn LocalTrait>
#85099